package com.ly.jpacontroller;

import com.ly.dto.User;
import com.ly.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class JpaController {
    @Autowired
    private IUserService service;

    @RequestMapping("jpa")
    public List<User> get(){
        System.out.println("sss");
        List<User> users = service.JPA_findAll();

        return users;
    }
}
